//
//  performSelectorOnMainThreadViewController.m
//  performSelectorOnMainThread
//
//  Created by Gakaki on 11-5-22.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "performSelectorOnMainThreadViewController.h"

@implementation performSelectorOnMainThreadViewController

- (void)dealloc
{
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [self performSelectorOnMainThread:@selector(refresh) withObject:nil waitUntilDone:YES];
    
    [super viewDidLoad];
}

-(void)refresh{
    NSLog(@"refresh");
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
